// 资源视频模型详情js
var $scope = null;
$(function() {
	var appElement = document.querySelector('[ng-controller=main]');
	$scope = angular.element(appElement).scope();
	var modelId = locationHref("modelId");
	$scope.modelId = modelId;
	initialPage($scope);
	$scope.methods.imageList();

});
function initialPage($scope) {
	
}
var mainApp = angular.module("mainApp", []);
mainApp.controller('main', function($scope,$sce) {
	$scope.search = {};
	$scope.methods = {
		//动态列表
		imageList: function() {
			$.ajax({
				url: $.shysUrlPrefix + '/website/model/' + $scope.modelId,
				type: 'get',
				dataType: 'JSON',
				async: true, //同步方式发起请求
				success: function(data) {
					if (data.data != null ) {
						console.log($scope.data)
						 $scope.modelName = data.data.modelName;
						 $scope.modelCover = data.data.modelCover+'?x-oss-process=image/watermark,color_FFFFFF,text_QOahpeaigeWcqOe6vw';
						 $scope.modelUrl = data.data.modelUrl;
						$scope.$apply();
					} else {

					}

				},

			})
		},

	},
	$scope.videoUrlFun = function(url){
	    var urlFun = $sce.trustAsResourceUrl(url);
	    return urlFun;
	};
});
